#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:homework2_2.py
# author:wmf
# datetime:2021/4/4 20:24
# software: PyCharm
'''
this is function description
'''
# import module your need

#2 编写一个函数,接收n个数字，求这些参数数字的和;

from random import randint

def Add(nums):
    add = 0
    for num in nums:
        add = num + add
    return add

nums1 = [1,2,3,4,10,18,66]

nums2 = [randint(0,100) for _ in range(10)]

print(Add(nums1))
for num2 in nums2:
    print(num2,end=' ')
print()
print(Add(nums2))
